package com.net.common.util;

        import java.time.LocalDateTime;

/**
 * 时间类的工具.
 */
public class DateUtil {

    public static boolean isBeforeOrUpdateNull(LocalDateTime newTime, LocalDateTime oldTime) {
        return newTime != null && (oldTime == null || newTime.isBefore(oldTime));
    }

    public static boolean isAfterOrUpdateNull(LocalDateTime newTime, LocalDateTime oldTime) {
        return newTime != null && (oldTime == null || newTime.isAfter(oldTime));
    }
}
